﻿<%@ Page language="c#" Codebehind="TaskList.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.Schedule.TaskList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-cn" />
<meta name="author" content="Herry" />
<meta name="Copyright" content="Copyright (c) 2009 himm.cn" />
<title>CalendarList</title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="/css/other.css" media="screen" />
<style type="text/css">
table {
	width:100%;
	border:none;
}
table th {
	background:#ccccff;
}
table th, table td {
	padding:3px;
}
table td span a, table td span a:visited {
	color:#fff;
}
.active1 {
	background:#1a499d;
}
.active2 {
	background:#337fb2;
	color:#fff;
	font-weight:bold;
}
.tabnavhead {
	text-align:right;
	position:relative;
}
.tnc {
	float:left;
	width:90px;
	height:30px;
	margin:0 0 0 5px;
	position:relative;
	bottom:0px;
}
.tnc a {
	width:90px;
	height:26px;
	display:block;
	padding:4px 0 0;
	text-align:center;
	line-height:26px;
	color:#fff;
}
.tnc a:visited {
	color:#fff;
}
.tnc a:hover {
	color:#ff0;
}
.tncr{ right:5px;}
.path .right {
	padding:6px 0 0;
}
.redButtonCss {
	font-family: "Tahoma", "宋体";
	font-size: 12px;
	color: #0066cc;
	border: 1px #93bee2 solid;
	background-image:url(/Images/redbuttonbg.gif);
	background-color: #fff;
	cursor:pointer;
	font-style: normal;
}
</style>
<script language="javascript">
		function dialwinprocess(CurrDate,CurrTime,whichPg,TaskID)
			{
			   if(whichPg==1)
				var newdialoguewin = window.showModalDialog("Manage.aspx?CurrDate="+CurrDate+"&CurrTime="+CurrTime,window,"dialogWidth:1000px;DialogHeight=700px;status:no");
			   else if(whichPg==2)
			   var newdialoguewin = window.showModalDialog("TaskDetail.aspx?TaskID="+TaskID+"&Date="+CurrDate,window,"dialogWidth:700px;DialogHeight=600px;status:no");
			   else if(whichPg==3)
			   var newdialoguewin = window.showModalDialog("TaskStatus.aspx?TaskID="+TaskID+"&Date="+CurrDate,window,"dialogWidth:700px;DialogHeight=600px;status:no");
			}
			
		var ball1 = new Image();
		var ball2 = new Image();
		ball1.src = 'images/ball1.gif';
		ball2.src = 'images/ball2.gif';

		var active = new Image();
		var nonactive = new Image();
		active.src = '../../../images/maillistbutton2.gif';
		nonactive.src = '../../../images/maillistbutton1.gif';

		function onMouseOver(img)
		{
			document.images[img].src = ball2.src;
		}

		function onMouseOut(img)
		{
			document.images[img].src = ball1.src;
		}

		function onOverBar(bar)
		{
			if (bar != null) {
				bar.style.backgroundImage = "url("+active.src+")";
				
			}
		}

		function onOutBar(bar)
		{
			if (bar != null) {
				bar.style.backgroundImage = "url("+nonactive.src+")";
			}
		}
		
		function selectAll(){
			var len=document.MailList.elements.length;
			var i;
		    for (i=0;i<len;i++){
			if (document.MailList.elements[i].type=="checkbox"){
		        document.MailList.elements[i].checked=true;								
						 }
					}
				}

		function unSelectAll(){
	          var len=document.MailList.elements.length;
	          var i;
	          for (i=0;i<len;i++){
	               if (document.MailList.elements[i].type=="checkbox"){
	                  document.MailList.elements[i].checked=false; 
	               }   
	        	 } 
		    }		

		</script>
</head>
<body>
<form id="TaskList" method="post" runat="server">
  <div class="m">
  <div class="path">
    <div class="right">
      <asp:button id="btnNew" runat="server" CssClass="redButtonCss" Text="新 建"></asp:button>
      <asp:button id="btnAccept" runat="server" CssClass="redButtonCss" Text="接 受"></asp:button>
      <asp:button id="btnCancel" runat="server" CssClass="redButtonCss" Text="取 消"></asp:button>
      <asp:button id="btnSubscribe" runat="server" CssClass="redButtonCss" Text="订 阅" Visible="False"></asp:button>
      观察视角:
      <asp:dropdownlist id="listStaff" runat="server" Width="105px" AutoPostBack="true" OnSelectedIndexChanged="listStaff_SelectedIndexChanged"></asp:dropdownlist>
    </div>
    <a href="/SubModule/UnitiveDocument/">我的桌面</a> >> 我的任务 </div>
  <div class="con">
  <div class="tabnav">
    <p class="tabnavhead"> <span class="active2 tnc"> <asp:linkbutton id="lnkbtnToday" runat="server">待完成</asp:linkbutton> </span> <span class="active1 tnc"> <asp:linkbutton id="lnkbtnHistory" runat="server" >未完成</asp:linkbutton> </span> <span class="active1 tnc"> <asp:linkbutton id="Linkbutton1" runat="server" >我的订阅</asp:linkbutton> </span> <span class="active1 tnc"> <asp:linkbutton id="lnkbtnFinished" runat="server">已完成</asp:linkbutton> </span> <span class="active1 tnc"> <asp:LinkButton id="lnkbtnArranged" runat="server">我的发起</asp:LinkButton> </span> </p>
  <asp:button id="btnWeeklyView" runat="server"  CssClass="redButtonCss" style="width: 60px; height: 20px" Text=" 周 览 " ></asp:button>
     <!-- <asp:Button ID="btnMonthlyView" runat="server" CssClass="redButtonCss" style="width: 60px; height: 20px" Text=" 月 览 " />--> <asp:Button id="btnCancelSubscription" runat="server" Text="取消订阅" CssClass="redButtonCss" Visible="False"></asp:Button></div>
  <asp:datagrid id="dgList" runat="server"   BackColor="White" CssClass="top" Width="100%" AllowPaging="True" CellPadding="3" AutoGenerateColumns="False" PagerStyle-Mode="NumericPages" PagerStyle-HorizontalAlign="Right" OnPageIndexChanged="DataGrid_PageChanged" DataKeyField="ID" BorderColor="#337FB2" BorderWidth="1px">
          <AlternatingItemStyle BackColor="#E8F4FF"></AlternatingItemStyle>
          <ItemStyle HorizontalAlign="Center"></ItemStyle>
          <HeaderStyle   ForeColor="White" BackColor="#337FB2"></HeaderStyle>
          <FooterStyle HorizontalAlign="Center"></FooterStyle>
          <Columns>
          <asp:TemplateColumn HeaderText="选择">
            <HeaderStyle HorizontalAlign="Center" Width="5%"></HeaderStyle>
            <ItemStyle   HorizontalAlign="Left" Height="20px" Width="60px"></ItemStyle>
            <ItemTemplate>
              <asp:CheckBox id="grpID" Checked="False" Runat="server"></asp:CheckBox>
            </ItemTemplate>
          </asp:TemplateColumn>
          <asp:TemplateColumn HeaderText="时段">
            <HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
            <ItemStyle HorizontalAlign="Left"></ItemStyle>
            <ItemTemplate>
              <asp:Label runat="server" Text='<%# Convert.ToDateTime(DataBinder.Eval(Container, "DataItem.Date").ToString()).ToShortDateString()+"  "+GetPeriodByPeriodID(DataBinder.Eval(Container, "DataItem.EndTime").ToString(),DataBinder.Eval(Container, "DataItem.beginPeriodID").ToString(),(DataBinder.Eval(Container, "DataItem.endPeriodID").ToString())) %>' ID="Label2" NAME="Label2"> </asp:Label>
              <asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Date").ToString() %>' ID="Label1" NAME="Label2" Visible = "false"> </asp:Label>
            </ItemTemplate>
          </asp:TemplateColumn>
          <asp:TemplateColumn HeaderText="内容">
            <HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
            <ItemStyle HorizontalAlign="Center"></ItemStyle>
            <ItemTemplate> <a href="#" onclick='javascript:return dialwinprocess("<%# DataBinder.Eval(Container, "DataItem.Date") %>","","2","<%# DataBinder.Eval(Container, "DataItem.TaskID") %>")'>
              <asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Subject") %>' ID="Label3" NAME="Label3"></a> </asp:Label>
            </ItemTemplate>
          </asp:TemplateColumn>
          <asp:TemplateColumn HeaderText="状态">
            <HeaderStyle HorizontalAlign="Center" Width="5%"></HeaderStyle>
            <ItemStyle HorizontalAlign="Center"></ItemStyle>
            <ItemTemplate>
              <asp:Label runat="server" Text='<%# GetStatus(DataBinder.Eval(Container, "DataItem.IsConfirm").ToString()) %>' ID="Label4" NAME="Label4"> </asp:Label>
            </ItemTemplate>
          </asp:TemplateColumn>
          <asp:TemplateColumn HeaderText="所有人">
            <HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
            <ItemTemplate>
              <asp:Label ID="Label5" runat="server" Text='<%# GetRealName(DataBinder.Eval(Container, "DataItem.ArrangedBy").ToString()) %>'> </asp:Label>
            </ItemTemplate>
          </asp:TemplateColumn>
          <asp:TemplateColumn HeaderText="执行人">
            <HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
            <ItemStyle HorizontalAlign="Left"></ItemStyle>
            <ItemTemplate>
              <asp:Label ID="Label6" runat="server" Text='<%# GetRealNameStr(DataBinder.Eval(Container, "DataItem.CooperatorList").ToString()) %>'> </asp:Label>
            </ItemTemplate>
            <EditItemTemplate>
              <asp:TextBox ID="TextBox1" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.CooperatorList") %>'> </asp:TextBox>
            </EditItemTemplate>
          </asp:TemplateColumn>
          <asp:TemplateColumn HeaderText="类型">
            <HeaderStyle HorizontalAlign="Center" Width="5%"></HeaderStyle>
            <ItemTemplate>
              <asp:Label ID="Label7" runat="server" Text='<%# GetType(DataBinder.Eval(Container, "DataItem.Type").ToString()) %>'> </asp:Label>
            </ItemTemplate>
          </asp:TemplateColumn>
          <asp:TemplateColumn HeaderText="所属项目">
            <HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
            <ItemStyle HorizontalAlign="Center"></ItemStyle>
            <ItemTemplate>
              <asp:Label ID="Label8" runat="server" Text='<%# GetProjectName(DataBinder.Eval(Container, "DataItem.ProjectID").ToString()) %>'> </asp:Label>
            </ItemTemplate>
          </asp:TemplateColumn>
          <asp:TemplateColumn HeaderText="反馈">
            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
            <ItemStyle HorizontalAlign="Center"></ItemStyle>
            <ItemTemplate> <a href="#" onclick='javascript:return dialwinprocess("<%# DataBinder.Eval(Container, "DataItem.Date") %>","","3","<%# DataBinder.Eval(Container, "DataItem.TaskID") %>")'> 反馈</a> </ItemTemplate>
          </asp:TemplateColumn>
          </Columns>
          <PagerStyle HorizontalAlign="Right" BackColor="#E8F4FF" Mode="NumericPages"></PagerStyle>
        </asp:datagrid>
  
 <p><asp:table id="Table1" runat="server" CssClass="top" Visible="False" Width="100%" BorderWidth="0px" Height="195px"></asp:table>
        <asp:label id="lblInstru" runat="server"  >待办: !  待定: ?  完成: √ </asp:label></p>
<table id="tblContainer" runat="server">
<tr>
<td id="bar1"> </td>
<td id="bar2"></td>
<td id="bar3"></td>
<td id="bar4"></td>
<td id="bar5"></td>
</tr>
</table>

    </div>
  </div>
</form>
</body>
</html>
<script language="javascript">

<!--
// 高亮背景
function high( which )
{ 
	which.style.background = "#87F977";
	which.style.font.color = "#000000";
}
// 取消背景高亮
function low( which )
{ 
	which.style.background = "#FFF8F7";
	which.style.font.color = "#000000";
}
-->   
</script>